home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / ftpd.z / ftpd
Encoding:
Text File  |  2001-04-17  |  19.2 KB  |  397 lines

  1.  
  2.  
  3.  
  4. FFFFTTTTPPPPDDDD((((1111MMMM))))                                                              FFFFTTTTPPPPDDDD((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ftpd - Internet File Transfer Protocol server
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////uuuussssrrrr////eeeettttcccc////ffffttttppppdddd [ ----ddddSSSSllllpppp ] [ ----tttt_t_i_m_e_o_u_t ] [ ----TTTT_m_a_x_t_i_m_e_o_u_t ]
  13.          [ ----uuuu_u_m_a_s_k ]
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      _F_t_p_d is the Internet File Transfer Protocol server process.  The server
  17.      uses the TCP protocol and listens at the well-known port specified in the
  18.      _s_e_r_v_i_c_e_s(4) file.
  19.  
  20.      _F_t_p_d is started by _i_n_e_t_d(1M) whenever a remote client makes a connection
  21.      request.  The following options should specified on the ftpd line  in
  22.      _i_n_e_t_d's configuration file, /etc/inetd.conf.
  23.  
  24.      If the ----llll option is specified, each successful and failed ftp session
  25.      login is logged in the syslog.  If this option is specified twice, the
  26.      retrieve (get), store (put), append, delete, make directory, remove
  27.      directory and rename operations and their filename arguments are also
  28.      logged.  If this option is specified thrice, logging for the retrieve
  29.      (get) and store (put) commands includes the number of bytes transferred.
  30.  
  31.      If the ----dddd option is specified, verbose debugging information is written
  32.      to the syslog.  Note: this option logs all the commands and arguments
  33.      that the client sends. However arguments from the PASS command for normal
  34.      accounts are not logged.
  35.  
  36.      The ftp server will timeout an inactive session after 15 minutes.  If the
  37.      ----tttt option is specified, the inactivity timeout period will be set to
  38.      _t_i_m_e_o_u_t seconds.  A client may also request a different timeout period;
  39.      the maximum period allowed may be set to _t_i_m_e_o_u_t seconds with the ----TTTT
  40.      option.  The default limit is 2 hours.
  41.  
  42.      The ----uuuu option specifies the default file protection mask (see _u_m_a_s_k(1)).
  43.      If not specified, the default mask is set to 022 (group- and world-
  44.      readable).  A client may also request a different mask.
  45.  
  46.      The ----SSSS option turns on extra safety measures for anonymous FTP sites.
  47.      For one thing, makes symbolic links appear to be ordinary links, so that
  48.      links do not leak names in 'private' directories.  (Those are directories
  49.      that are not searchable by anonymous users.)
  50.  
  51.      The ----pppp option turns on address checking to prevent the PORT command from
  52.      redirecting the ftp-data connection to a third party machine.  This
  53.      provides added protection from network scanning.
  54.  
  55.      The file /_e_t_c/_n_o_l_o_g_i_n can be used to disable ftp access.  If the file
  56.      exists, _f_t_p_d prints it and exits.  If the file /_e_t_c/_i_s_s_u_e exists, _f_t_p_d
  57.      prints it before issuing the ``ready'' message.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. FFFFTTTTPPPPDDDD((((1111MMMM))))                                                              FFFFTTTTPPPPDDDD((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      The ftp server currently supports the following ftp requests; case is not
  75.      distinguished.
  76.  
  77.      RRRReeeeqqqquuuueeeesssstttt        DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  78.      ABOR           abort previous command
  79.      ACCT           specify account (ignored)
  80.      ALLO           allocate storage (vacuously)
  81.      APPE           append to a file
  82.      CDUP           change to parent of current working directory
  83.      CWD            change working directory
  84.      DELE           delete a file
  85.      HELP           give help information
  86.      LIST           give list files in a directory (``ls -lA'')
  87.      MKD            make a directory
  88.      MDTM           show last modification time of file
  89.      MODE           specify data transfer _m_o_d_e
  90.      NLST           give name list of files in directory
  91.      NOOP           do nothing
  92.      PASS           specify password
  93.      PASV           prepare for server-to-server transfer
  94.      PORT           specify data connection port
  95.      PWD            print the current working directory
  96.      QUIT           terminate session
  97.      REST           restart incomplete transfer
  98.      RETR           retrieve a file
  99.      RMD            remove a directory
  100.      RNFR           specify rename-from file name
  101.      RNTO           specify rename-to file name
  102.      SITE           non-standard commands (see next section)
  103.      SIZE           return size of file
  104.      STAT           return status of server
  105.      STOR           store a file
  106.      STOU           store a file with a unique name
  107.      STRU           specify data transfer _s_t_r_u_c_t_u_r_e
  108.      SYST           show operating system type of server system
  109.      TYPE           specify data transfer _t_y_p_e
  110.      USER           specify user name
  111.      XCUP           change to parent of current working directory (deprecated)
  112.      XCWD           change working directory (deprecated)
  113.      XMKD           make a directory (deprecated)
  114.      XPWD           print the current working directory (deprecated)
  115.      XRMD           remove a directory (deprecated)
  116.  
  117.      The following non-standard or UNIX specific commands are supported by the
  118.      SITE request.
  119.  
  120.      RRRReeeeqqqquuuueeeesssstttt        DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  121.      UMASK          change umask, e.g., SITE UMASK 002
  122.      IDLE           set idle-timer, e.g., SITE IDLE 60
  123.      CHMOD          change mode of a file, e.g., SITE CHMOD 755 filename
  124.      HELP           give help information, e.g., SITE HELP
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. FFFFTTTTPPPPDDDD((((1111MMMM))))                                                              FFFFTTTTPPPPDDDD((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      The remaining ftp requests specified in Internet RFC 959 are recognized,
  141.      but not implemented.  MDTM and SIZE are not specified in RFC 959, but
  142.      will appear in the next updated FTP RFC.
  143.  
  144.      The ftp server will abort an active file transfer only when the ABOR
  145.      command is preceded by a Telnet "Interrupt Process" (IP) signal and a
  146.      Telnet "Synch" signal in the command Telnet stream, as described in
  147.      Internet RFC 959.  If a STAT command is received during a data transfer,
  148.      preceded by a Telnet IP and Synch, transfer status will be returned.
  149.  
  150.      _F_t_p_d interprets file names according to the ``globbing'' conventions used
  151.      by _c_s_h(1).  This allows users to utilize the metacharacters ``*?[]{}~''.
  152.  
  153.      _F_t_p_d authenticates users according to three rules.
  154.  
  155.      1) The user name must be in the password data base, /_e_t_c/_p_a_s_s_w_d, and not
  156.         have a null password.  In this case a password must be provided by the
  157.         client before any file operations may be performed.
  158.  
  159.      2) The user name must not appear in the file /_e_t_c/_f_t_p_u_s_e_r_s.  However, if
  160.         the user name is in /_e_t_c/_f_t_p_u_s_e_r_s followed by the white-space
  161.         separated keyword ``restrict'', the user is allowed restricted access
  162.         privileges, as described below.
  163.  
  164.      3) If the user name is ``anonymous'' or ``ftp'', an anonymous ftp account
  165.         must be present in the password file (user ``ftp'').  In this case the
  166.         user is allowed to log in by specifying any password (by convention
  167.         this is given as the client user and host name).
  168.  
  169.      For the restricted and anonymous accounts, _f_t_p_d takes special measures to
  170.      restrict the client's access privileges.  The server performs a _c_h_r_o_o_t(2)
  171.      command to the home directory of the user and prints the file README if
  172.      it exists.  In order that system security is not breached, it is
  173.      recommended that the subtree be constructed with care;  the following
  174.      rules are recommended, using the ``ftp'' anonymous account as an example.
  175.      If you allow logins as the ftp account, then you should instead make all
  176.      the files and directories owned by a user and group other than ftp (or
  177.      any other account that can login using the restricted passwd file in the
  178.      chrooted tree), with the possible exception of directories to which you
  179.      allow file transfers, such as ~ftp/pub.  Remember that because the
  180.      account name and password are valid, the user will be able to login
  181.      directly or via _t_e_l_n_e_t, _r_l_o_g_i_n, or _r_s_h.  This can be prevented, if
  182.      desired, by using the feature documented in the _p_a_s_s_w_d(4) man page,
  183.      having the shell field start with ****, and the home directory being a real
  184.      or impossible base for the chrooted environment.  See that manual page
  185.      for more information.
  186.  
  187.      ~ftp      Make the home directory owned by ``bin'' and unwritable by
  188.                anyone (mode 555 - see _c_h_m_o_d(1)):
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. FFFFTTTTPPPPDDDD((((1111MMMM))))                                                              FFFFTTTTPPPPDDDD((((1111MMMM))))
  203.  
  204.  
  205.  
  206.                     chown bin ~ftp
  207.                     chmod a-w ~ftp
  208.  
  209.  
  210.      ~ftp/bin  Make this directory owned by the super-user and unwritable by
  211.                anyone (mode 555).  The program _l_s(1) must be present to
  212.                support the list commands.  This program should have mode 111.
  213.  
  214.      ~ftp/etc  Make this directory owned by the super-user and unwritable by
  215.                anyone (mode 555).  The files _p_a_s_s_w_d(4) and _g_r_o_u_p(4) must be
  216.                present for the _l_s command to be able to produce owner names
  217.                rather than numbers.  This should not be a copy of the real
  218.                file in /etc, and in particular, it should contain no encrypted
  219.                passwords from the real /etc/passwd or /etc/group.  The
  220.                password field in _p_a_s_s_w_d is not used.  Only the minimal number
  221.                of accounts should be listed.  These files should be mode 444.
  222.  
  223.      ~ftp/lib32
  224.                Make this directory own by the super-user and unwritable by
  225.                anyone (mode 555).  In order for ls to run, the files
  226.                /_l_i_b_3_2/_r_l_d and /_l_i_b_3_2/_l_i_b_c._s_o._1 must be copied into lib32
  227.                (older releases, or some uses of other programs might also
  228.                require the o32 versions in /_l_i_b.  Both _r_l_d and _l_i_b_c._s_o._1
  229.                should be readable and executable by everyone, _e._g. mode 555.
  230.  
  231.      ~ftp/dev  Make this directory owned by the super-user and unwritable by
  232.                anyone (mode 555).  _r_l_d uses /_d_e_v/_z_e_r_o, so use mknod(1) to make
  233.                a copy  of /_d_e_v/_z_e_r_o in ~ftp/dev with the same major and minor
  234.                device numbers.  Make /_d_e_v/_z_e_r_o read-only (mode 444).
  235.  
  236.                     mknod ~ftp/dev/zero c 37 0
  237.                     chmod 444 ~ftp/dev/zero
  238.  
  239.  
  240.      ~ftp/pub  Make this directory owned by ``ftp''. If local users and remote
  241.                anonymous users are to be allowed to write in this directory,
  242.                change the directory's mode to 777.  Users can then place files
  243.                which are to be accessible via the anonymous account in this
  244.                directory.  If write accesses are to be denied, change the
  245.                directory's mode to 555.
  246.  
  247. SSSSHHHHAAAARRRREEEE IIIIIIII AAAACCCCTTTTIIIIOOOONNNNSSSS
  248.      If the Share II system is installed and enabled, then the following
  249.      privilege and resource checks are made immediately after the other
  250.      validation checks are passed but before the ftp session is permitted to
  251.      begin:
  252.  
  253.      1.  If your _nnnn_oooo_llll_oooo_gggg_iiii_nnnn flag is set, or you already have another connection
  254.          and your _oooo_nnnn_eeee_llll_oooo_gggg_iiii_nnnn flag is set, then you are denied connection.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. FFFFTTTTPPPPDDDD((((1111MMMM))))                                                              FFFFTTTTPPPPDDDD((((1111MMMM))))
  269.  
  270.  
  271.  
  272.      2.  If a disk usage exceeds its soft disk limit in any of your domains,
  273.          then a message is printed and you are given a _w_a_r_n_i_n_g.  If you
  274.          accumulate too many warnings, further connection attempts are denied
  275.          and you must see your subadministrator to rectify the situation.
  276.          Whenever you connect with no disk usages in excess of any soft
  277.          limits, all your accumulated warnings are cleared.
  278.  
  279.      3.  If you do not have permission to use an _f_t_p connection, as determined
  280.          by the terminal permission flag _tttt_eeee_rrrr_mmmm_iiii_nnnn_aaaa_llll_...._ffff_llll_aaaa_gggg_...._ffff_tttt_pppp, then you are
  281.          denied connection.
  282.  
  283.      4.  Some installations place limits on terminal connect-time, which apply
  284.          equally to connection by way of _f_t_p.  If you have already reached
  285.          your connect-time limit, then you are denied connection.  Otherwise,
  286.          if you have a limit, your remaining connect-time is printed.
  287.  
  288.      If all of these checks are passed, _ffff_tttt_pppp_dddd proceeds normally.
  289.  
  290. FFFFIIIILLLLEEEESSSS
  291.      /etc/ftpusers     list of unwelcome/restricted users
  292.      /etc/issue        welcome notice
  293.      /etc/nologin      disables access
  294.      /etc/limconf      The compiled Share II configuration file (machine
  295.      readable)
  296.  
  297. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  298.      login(1), ftp(1C), inetd(1M), rexecd(1M), syslogd(1M), passwd(4),
  299.      share(5)
  300.  
  301. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  302.      The Share II specific diagnostic messages are listed as follows:
  303.  
  304.      _WWWW_aaaa_rrrr_nnnn_iiii_nnnn_gggg _X _oooo_ffff _Y: soft disk limit exceeded.
  305.           One of your domains has a disk usage in excess of its soft limit.
  306.  
  307.      _CCCC_oooo_nnnn_nnnn_eeee_cccc_tttt_iiii_oooo_nnnn _dddd_eeee_nnnn_iiii_eeee_dddd_....  _TTTT_oooo_oooo _mmmm_aaaa_nnnn_yyyy _wwww_aaaa_rrrr_nnnn_iiii_nnnn_gggg_ssss_....
  308.           You have reached your warning limit.  See your subadministrator.
  309.  
  310.      _CCCC_oooo_nnnn_nnnn_eeee_cccc_tttt_iiii_oooo_nnnn _dddd_eeee_nnnn_iiii_eeee_dddd_....  _AAAA_llll_rrrr_eeee_aaaa_dddd_yyyy _llll_oooo_gggg_gggg_eeee_dddd _iiii_nnnn _---- _oooo_nnnn_llll_yyyy _oooo_nnnn_eeee _llll_oooo_gggg_iiii_nnnn _aaaa_llll_llll_oooo_wwww_eeee_dddd_....
  311.           You are already connected to the system and your _oooo_nnnn_eeee_llll_oooo_gggg_iiii_nnnn flag is
  312.           set.
  313.  
  314.      _CCCC_oooo_nnnn_nnnn_eeee_cccc_tttt_iiii_oooo_nnnn _dddd_eeee_nnnn_iiii_eeee_dddd_....  _CCCC_uuuu_rrrr_rrrr_eeee_nnnn_tttt_llll_yyyy _bbbb_aaaa_rrrr_rrrr_eeee_dddd _ffff_rrrr_oooo_mmmm _llll_oooo_gggg_gggg_iiii_nnnn_gggg _iiii_nnnn_....
  315.           Your _nnnn_oooo_llll_oooo_gggg_iiii_nnnn flag is set.
  316.  
  317.      _CCCC_oooo_nnnn_nnnn_eeee_cccc_tttt_iiii_oooo_nnnn _dddd_eeee_nnnn_iiii_eeee_dddd_....  _NNNN_oooo _pppp_eeee_rrrr_mmmm_iiii_ssss_ssss_iiii_oooo_nnnn _tttt_oooo _uuuu_ssss_eeee _tttt_hhhh_iiii_ssss _tttt_eeee_rrrr_mmmm_iiii_nnnn_aaaa_llll_....
  318.           You are not allowed to log in at this terminal because of a clear
  319.           _tttt_eeee_rrrr_mmmm_iiii_nnnn_aaaa_llll_...._ffff_llll_aaaa_gggg_...._rrrr_ssss_hhhh flag.
  320.  
  321.      _YYYY_oooo_uuuu _hhhh_aaaa_vvvv_eeee _aaaa _rrrr_eeee_mmmm_aaaa_iiii_nnnn_iiii_nnnn_gggg _tttt_eeee_rrrr_mmmm_iiii_nnnn_aaaa_llll _cccc_oooo_nnnn_nnnn_eeee_cccc_tttt_----_tttt_iiii_mmmm_eeee _oooo_ffff _Y.
  322.           You may use this connection until you have used up your remaining
  323.           connect-time, at which point you are forced to disconnect.
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. FFFFTTTTPPPPDDDD((((1111MMMM))))                                                              FFFFTTTTPPPPDDDD((((1111MMMM))))
  335.  
  336.  
  337.  
  338.      _CCCC_oooo_nnnn_nnnn_eeee_cccc_tttt_iiii_oooo_nnnn _dddd_eeee_nnnn_iiii_eeee_dddd_....  _TTTT_eeee_rrrr_mmmm_iiii_nnnn_aaaa_llll _cccc_oooo_nnnn_nnnn_eeee_cccc_tttt_----_tttt_iiii_mmmm_eeee _llll_iiii_mmmm_iiii_tttt _eeee_xxxx_cccc_eeee_eeee_dddd_eeee_dddd_....
  339.           You have already reached your terminal connect-time limit.
  340.  
  341.      _SSSS_hhhh_aaaa_rrrr_eeee _nnnn_oooo_tttt _cccc_oooo_nnnn_ffff_iiii_gggg_uuuu_rrrr_eeee_dddd _---- _nnnn_oooo _llll_iiii_mmmm_iiii_tttt _cccc_hhhh_eeee_cccc_kkkk_ssss_....
  342.           The configuration file is unreadable for some reason, so terminal
  343.           privileges, connect-time limits and disk space limits could not be
  344.           checked.
  345.  
  346. BBBBUUUUGGGGSSSS
  347.      The anonymous account is inherently dangerous and should avoided when
  348.      possible.
  349.  
  350.      The server must run as the super-user to create sockets with privileged
  351.      port numbers.  It maintains an effective user ID of the logged in user,
  352.      reverting to the super-user only when binding addresses to sockets.  The
  353.      possible security holes have been extensively scrutinized, but are
  354.      possibly incomplete.
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.